Some security cameras operate in one of two modes depending on the ambient lighting conditions. Day mode is used when there is sufficient ambient light to adequately illuminate a scene. Night mode (or IR mode) is used when there is not enough ambient light to adequately illuminate the scene, in which case the camera can provide its own infrared (IR) illumination (e.g., using onboard IR LEDs).
One challenge for such cameras is that when the IR illumination is being provided by the camera during night mode, the IR illumination may result in some areas of the images and video captured by the camera being overexposed and other areas being under-exposed. Various conditions and circumstances may lead to such over or underexposure while IR illumination is active (e.g., the nature of the scene being captured, whether or not external illumination was introduced after the IR illumination became active, etc.). This is a challenge because important details in the images and video captured by the camera may be harder to see due to the over or underexposure.